[20251222] BOJ / P3 / 수열의 개수 NKD / 권혁준 #1727
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🧷 문제 링크
https://www.acmicpc.net/problem/1336
🧭 풀이 시간
60분
👀 체감 난이도
✏️ 문제 설명
아래 조건을 만족하는 길이 K인 자연수 수열 A의 개수를 구해보자.

🔍 풀이 방법
K > 446이면? 못 만듬.
dp[k][s] = s번 돌까지 k개의 돌을 지나온 경우의 수라고 정의.
dp[1][x] = 1 (1 <= x <= D)
내가 현재 s번 돌에 있다면, 2s+1부터 2s+D까지 갈 수 있음
-> imos로 다음 스텝의 DP값을 계산하도록.
⏳ 회고
아오 왜 틀리는거야